#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
    int n = 0, a[5] = { 0 }, i = 0;
    scanf("%d", &n);
    while (n > 0)
    {
        a[i] = (n % 10 + 9) % 10;
        n /= 10;
        i++;
    }
    for (i = 0; i < 1; i++)
    {
        int t = a[0];
        a[0] = a[1];
        a[1] = t;
        int c = a[2];
        a[2] = a[3];
        a[3] = c;
    }
    printf("The encrypted number is ");
    for (i = 0; i < 4; i++)
    {
        printf("%d", a[i]);
    }

    return 0;
}